<?php
namespace app\admin\validate;

use think\Validate;

class Post extends Validate
{
    protected $rule = [
        'number'=>'require',
        'func'=>'require',
        'requirement'=>'require',
    ];

    protected $message = [
        'number.require'=>'{%number_unique}',
        'func.require'=>'{%name_unique}',
        'requirement.require'=>'{%race_require}',
    ];

    protected $scene = [
        'add'   => ['func', 'requirement','number'],
        'edit'  => ['func', 'requirement','number'],
        'password' => ['password', 'repassword'],
        'status' => ['status'],
    ];
}